<template>
	<w-app-container>
		<fx-page-header title="工序任务单"></fx-page-header>
    <w-app-container direction="row" class="fx-page-first-container">
			<listContainer
				ref="listContainer"
				@on-refresh="initProcessTaskList"
				@on-edit="onEdit"
			></listContainer>
			<createContainer ref="createContainer" @on-refresh="initProcessTaskList"></createContainer>
		</w-app-container>
	</w-app-container>
</template>
<script>
import listContainer from './components/list-container/Index.vue'
import createContainer from './components/create-container/Index.vue'
export default {
	name: 'processTask',
	components: {
		listContainer,
		createContainer
	},
	mounted () {
		this.initProcessTaskList()
	},
	methods: {
		initProcessTaskList () {
			this.$refs.listContainer.refresh()
		},
		onEdit (processTaskDetails, tableDetails) {
			this.$refs.createContainer.edit(processTaskDetails, tableDetails)
		}
	}
}
</script>
